<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/common/common.jsp" %>
<%@ page import="com.chanyachting.emall.util.RequestUtil" %>
<%@ page import="com.chanyachting.emall.domain.Member" %>
<%@ page import="com.chanyachting.emall.domain.Orders"%>
<%@ page import="com.chanyachting.emall.domain.Memberaccount"%>
<%@ page import="java.util.*"%>
<%@ page import="com.chanyachting.emall.service.OrdersService"%>
<%@ page import="com.chanyachting.emall.service.MemberService"%>
<%@ page import="com.chanyachting.emall.serviceImpl.OrdersServiceImpl"%>
<%@ page import="com.chanyachting.emall.service.MemberaccountService" %>
<%@ page import="com.chanyachting.emall.serviceImpl.MemberaccountServiceImpl" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" /> 
<meta name="description" content="" />
<link href="css/import.css" type="text/css" rel="stylesheet" />
<title></title>
</head>

<body>
<div class="tab_box">
	<div class="tab_menu">
       
        <a href="memberAccount_emallProduct.jsp" >订购产品/服务</a>
        <a href="memberAccount_online_pay.jsp" >充值</a>
        <a href="memberAccount_info.jsp">帐户信息</a>
        <a href="memberAccount_orders.jsp" class="current">付费记录</a>
    </div>
    <div class="tab_submenu"></div>
</div>
<form id="form1" name="form1" method="post" action="">
  <table width="700" border="0" align="center" cellpadding="0" cellspacing="0" class="orders">
    <tr>
      <td align="center">编号</td>
      <td width="10%" align="center">商品编号</td>
      <td width="12%" align="center">商品名称</td>
      <td width="10%" align="center">金额</td>
      <td width="15%" align="center">商品类型</td>
      <td width="15%" align="center">商品限制时间</td>
      <td width="15%" align="center">购买时间</td>
       <td width="15%" align="center">订单状态</td>
    </tr>
    
    
    <%
    
		RequestUtil ru=new RequestUtil(request);
	
		Member member=(Member)ru.getSessionObject(MemberService.MEMBER_IN_SESSION,new Member());
		
		//获得指定会员的会员账号对象
		MemberaccountService maService=new  MemberaccountServiceImpl();
		
		Memberaccount ma=maService.getMemberaccountByMember(member);
		
		List list=new ArrayList();
		
		if(ma!=null){
			
			OrdersService orderService=new OrdersServiceImpl();
			
			list=orderService.getOrdersByMemberAccount(ma);
			
		}
    
    %>
    
    <%
    	if(list!=null && list.size()>0){
    		
    		Orders order=null;
    		
    		for(int i=0;i<list.size();i++){
    			
    			order=(Orders)list.get(i);
    			
    %>
    <tr>
      <td align="center" bgcolor="#F0F0F0"><%= order.getId() %></td>
      <td bgcolor="#F0F0F0"><%= order.getEmallProductId() %></td>
      <td align="center" bgcolor="#F0F0F0"><%= order.getEmallProductName() %></td>
      <td align="center" bgcolor="#F0F0F0"><%= order.getEmallProductPrice() %></td>
      <td align="center" bgcolor="#F0F0F0"><%= order.getEmallProductType() %></td>
      <td align="center" bgcolor="#F0F0F0"><%= order.getEmallProductTimeLimit() %></td>
      <td align="center" bgcolor="#F0F0F0"><%= order.getOrderDate() %></td>
      <td align="center" bgcolor="#F0F0F0"><%= order.getStatus() %></td>
    </tr>
    
    <%
    			
    		}
    		
    	}
    
    %>
    
    
    
    <tr>
      <td align="center">&nbsp;</td>
      <td>&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
       <td align="center">&nbsp;</td>
    </tr>
    <tr>
      <td align="center" bgcolor="#F0F0F0">&nbsp;</td>
      <td bgcolor="#F0F0F0">&nbsp;</td>
      <td align="center" bgcolor="#F0F0F0">&nbsp;</td>
      <td align="center" bgcolor="#F0F0F0">&nbsp;</td>
      <td align="center" bgcolor="#F0F0F0">&nbsp;</td>
      <td align="center" bgcolor="#F0F0F0">&nbsp;</td>
      <td align="center" bgcolor="#F0F0F0">&nbsp;</td>
      <td align="center" bgcolor="#F0F0F0">&nbsp;</td>
    </tr>
    <tr>
      <td align="center">&nbsp;</td>
      <td>&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
      <td align="center">&nbsp;</td>
    </tr>
  </table>
</form>
</body>
</html>
